// src/i18n.js
import i18n from "i18next";
import { initReactI18next } from "react-i18next";

i18n.use(initReactI18next).init({
  resources: {
    en: {
      translation: {
        welcome: "Welcome to our app",
        greeting: "Hello, {{name}}!",
      },
    },
    zh: {
      translation: {
        welcome: "欢迎使用我们的应用",
        greeting: "你好, {{name}}!",
      },
    },
  },
  lng: "en", // 默认语言
  fallbackLng: "en",
  interpolation: {
    escapeValue: false,
  },
});

export default i18n;
